
import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main, sim_items
from util import *

class Potion(sim_items.Potion):
    def __init__(self):
        sim_items.Potion.__init__(self, "dexterity", "!",
                ('go', 'have', 'more'),
                idDescription="A most useful and sought-after stimulant, "\
                    "this tonic heightens the mental focus and physical "\
                    "coordination of its user, permitting otherwise "\
                    "impossible feats of reaction and dexterity. The "\
                    "accompanying euphoria, however, has enticed many a poor "\
                    "wretch to its overuse and their eventual "\
                    "self-destruction; caution is advised.")

    def quaff(self, quaffer):
        self.amount = random.randint(9,11)
        self.duration = 30000

        main.schedule(sim.Event('increase stat', main.schedule.time, (quaffer,
            'dexterityMod', self.amount), dests=[quaffer],
            options={'statusNote+':'dextrous'}))
        main.schedule(sim.Event('decrease stat', main.schedule.time +\
            self.duration, (quaffer, 'dexterityMod', self.amount),
            dests=[quaffer], options={'statusNote-':'dextrous'}))
        quaffer.identify(self)

#========================================
thingClass = Potion


